﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gadgeteer.Interfaces.Fakes.Tests
{
    [TestFixture]
    public class FakeMultiColorLedTest
    {
        [Test]
        public void DefaultAllow_SetGreen()
        {
            var led = new FakeMultiColorLed();

            Assert.That(led.Color, Is.EqualTo(Color.Black));
            Assert.That(led.IsOn, Is.False, "Led should be Off");

            led.TurnGreen();
            Assert.That(led.IsOn, Is.True, "Led should be On");
            led.TurnOff();
            Assert.That(led.IsOn, Is.False, "Led should be Off");
            Assert.That(led.Color, Is.EqualTo(Color.Black));
        }

        [Test]
        public void DefaultAllow_SetWhite()
        {
            var led = new FakeMultiColorLed();

            Assert.That(led.Color, Is.EqualTo(Color.Black));
            Assert.That(led.IsOn, Is.False, "Led should be Off");

            led.TurnWhite();
            Assert.That(led.IsOn, Is.True, "Led should be On");
            led.TurnOff();
            Assert.That(led.IsOn, Is.False, "Led should be Off");
            Assert.That(led.Color, Is.EqualTo(Color.Black));
        }
    }
}
